POV-Ray : Newsgroups : povray.binaries.images : Object packing (4 images, ~200kB total) : Re: Object packing (4 images, ~200kB total) Server Time
11 Aug 2024 15:14:08 EDT (-0400)
  Re: Object packing (4 images, ~200kB total)  
From: Dave Matthews
Date: 7 Apr 2004 12:37:32
Message: <40742e4c$1@news.povray.org>
Hohum wrote:

> Your wish is my command.
> My less than optimal code in is now p.b.s-f, but it gets the job done.
> Micheal Andrews results seem more flexible than mine, and faster too.
> 
> My code could be altered to do 3D checks, I believe it's the same principle
> to check spherical clearance in 3D as it is for disc clearance in 2D.
> 
> taking x=difference in x coords of test points, etc
> clearance is half the diameter of each object
> 2D
> if x^2 + y^2 < clearance^2 then you are too close.
> 3D
> if x^2 + y^2 + y^2 < clearance^2 then you are too close, I think.
> 
> 

Thanks!

Dave Matthews


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.